<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>收货地址</title>
		[#include "/common/include.ftl"/]
		<link type="text/css" rel="styleSheet" href="${base}/resource/css/member.css">
		<link type="text/css" rel="styleSheet" href="${base}/resource/css/member-module.css">
		<script type="text/javascript" src="${base}/resource/js/member.js"></script>
		<script type="text/javascript" src="${base}/resource/js/address.module.js"></script>
		<script type="text/javascript" src="${base}/resource/plug/citySelect/jquery.cityselect.js"></script>
	</head>
	<body class="customer">
		[#include "/common/header.ftl"/]
		<div class="crumbs">
			<a href="${base}/member/index.jhtml">会员中心</a>
			<i style='font-family: simsun;font-style: normal;'>></i>
			<a>账户中心</a>
			<i style='font-family: simsun;font-style: normal;'>></i>
			<a>收货地址</a>
		</div>
		<!-- 新增收货地址-->
		<div id="edit-cont">
			<div class="mc">
				<div class="form">
					<input type="hidden" value="0" class="id">
					<div class="item">
						<div class="label">
							<em>*</em><span>收货人</span>
						</div>
						<div class="fl">
							<input type="text" class="text name">
							<span class="error-msg"></span>
						</div>
						<div class="clear"></div>
					</div>
					<div class="item">
						<div class="label">
							<em>*</em><span>所在地区</span>
						</div>
						<div id="element_id" class="fl">
							<select data-first-title="请选择" data-first-value='0' class="sele prov"></select>
							<select data-first-title="请选择" data-first-value='0' class="sele city"></select>
							<select data-first-title="请选择" data-first-value='0' class="sele dist"></select><span class="error-msg"> </span>
						</div>
						<div class="clear"></div>
					</div>
					<div class="item">
						<div class="label">
							<em>*</em><span>详细地址</span>
						</div>
						<div class="fl">
							<input type="text" class="text text1 address">
							<span class="error-msg"></span>
						</div>
						<div class="clear"></div>
					</div>
					<div class="item">
						<div class="label">
							<em>*</em><span>手机号码</span>
						</div>
						<div class="fl">
							<input type="text" class="text phone">
							<span class="error-msg"> </span>
						</div>
						<div class="clear"></div>
					</div>
                    <div class="item">
                        <div class="label">
                            <em>*</em><span>邮编</span>
                        </div>
                        <div class="fl">
                            <input type="text" name="contact" class="text zipCode">
                            <span class="error-msg"> </span>
                        </div>
                        <div class="clear"></div>
                    </div>

                    <div class="item">
                        <div class="label">
                            <span>地址别名</span>
                        </div>
                        <div class="fl">
                            <input type="text" class="text alias">
                            <span>设置一个易记的名称，如：“送到家里”、“送到公司”</span>
                        </div>
                        <div class="clear"></div>
                    </div>
				</div>
			</div>
		</div>
		<div id="member-main">
			[#assign menuNo = 'receiver']
			[#include "/common/member-left.ftl"/]
			<div class="member-right">
				<div class="right-wrap">
					<div id="member-address">
						<div class="list-header">
							<a class="hp-button fl add-new-address">新增收货地址</a><span>您已创建${receivers?size}个收货地址，最多可创建20个</span>
							<div class="clear"></div>
						</div>
						[#if receivers?has_content]
							[#list receivers as receiver]
								<div class="address-box [#if receiver.isDefault?? && receiver.isDefault]default[/#if]">
									<div class="a-head">
										<h3>
											<span class="name">${receiver.name}</span>
											<span>的收货地址</span>
											[#if receiver.alias?? && receiver.alias?trim!='']<span>(${receiver.alias})</span>[/#if]
											<span class="default-b">默认地址</span>
										</h3><a href="javascript:" data-id='${receiver.id}' class="del-address">X</a>
									</div>
									<div class="item">
										<dl>
											<dt>
												收货人
											</dt>
											<dd class="name">
												${receiver.name}
											</dd>
										</dl>
										<dl>
											<dt>
												所在地区
											</dt>
											<dd class="category">
												${receiver.area}
											</dd>
										</dl>
										<dl>
											<dt>
												地址
											</dt>
											<dd class="address">
												${receiver.address}
											</dd>
										</dl>
										<dl>
											<dt>
												联系方式
											</dt>
											<dd>
												<span class="phone">${receiver.contact}</span>
												<ul class="actions">
													<li>
														<a href="javascript:" data="${receiver?html}" class="edit-address">编辑</a>
													</li>
													<li>
														<a data-id='${receiver.id}' href="javascript:" class="set-default set-default">设为默认 </a>
													</li>
												</ul>
											</dd>
										</dl>
									</div>
								</div>
							[/#list]
						[#else]
						
						[/#if]
					</div>
					<!--模板文件-->
					<script id="address-item" type="text/html">
						<div class="address-box">
							<div class="a-head">
								<h3> <span class="name">{{name}}</span><span>的收货地址</span>{{if alias}}<span>({{alias}})</span>{{/if}}<span class="default-b">默认地址</span></h3><a href="javascript:" data-id="{{id}}" class="del-address">X</a>
							</div>
							<div class="item">
								<dl>
									<dt>收货人</dt>
									<dd class="name">{{name}}</dd>
								</dl>
								<dl>
									<dt>所在地区</dt>
									<dd class="cateogry">{{category}}</dd>
								</dl>
								<dl>
									<dt>地址</dt>
									<dd class="address">{{address}}</dd>
								</dl>
								<dl>
									<dt>手机</dt>
									<dd>
										<span class="phone">{{phone}}</span>
										<ul class="actions">
											<li><a href="javascript:" data="{{data}}" class="edit-address">编辑</a></li>
											<li><a data-id="{{id}}" href="javascript:" class="set-default set-default">设为默认 </a></li>
										</ul>
									</dd>
								</dl>
							</div>
						</div>
					</script>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		[#include "common/footer-slidebar-lazyload.ftl"]
	</body>
</html>